package com.example.promethues.strategy;

import com.example.promethues.dto.PromApiData;
import com.example.promethues.dto.PromApiResult;
import com.example.promethues.vo.DatasetVo;

import java.util.List;

public abstract class PromConvertStrategy {

    protected String resultType;

    protected PromConvertStrategy(String resultType) {
        this.resultType = resultType;
    }

    public static PromConvertStrategy create(String resultType){
        if ("matrix".equals(resultType)) {
            return new PromMatrixConvertStrategy(resultType);
        } else if ("vector".equals(resultType)) {
            return new PromVectorConvertStrategy(resultType);
        }else if ("scalar".equals(resultType)) {
            return new PromScalarConvertStrategy(resultType);
        }else if ("string".equals(resultType)) {
            return new PromStringConvertStrategy(resultType);
        }else{
            return new PromVectorConvertStrategy(resultType);
        }

    }
    public abstract List<DatasetVo> toDataSets(PromApiData promApiData);
}
